<?php
/**
* SocialEngine
*
* @category   Application_Extensions
* @package    Flashgame
* @copyright 2010 YouNet
* @license    http://www.modules2buy.com/license/
* @version    $Id: AdminSettingsController.php 6527 2010-06-23 02:03:14Z YouNet $
* @author     ToAnh
*/

/**
* @category   Application_Extensions
* @package    Flashgame
* @copyright 2010 YouNet
* @license    http://www.socialengine.net/license/
*/
class Flashgame_AdminSettingsController extends Core_Controller_Action_Admin
{
    public function indexAction()
    {
        $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')
        ->getNavigation('flashgame_admin_main');

        $this->view->form = $form = new Flashgame_Form_Admin_Global();

        if( $this->getRequest()->isPost()&& $form->isValid($this->getRequest()->getPost()))
        {
            $values = $form->getValues();

            foreach ($values as $key => $value){
                Engine_Api::_()->getApi('settings', 'core')->setSetting($key, $value);
            }

        }
    }


}